$OpenBSD: patch-gettext-runtime_intl_localcharset_c,v 1.4 2014/10/20 18:34:38 naddy Exp $
--- gettext-runtime/intl/localcharset.c.orig	Wed Oct  1 04:35:20 2014
+++ gettext-runtime/intl/localcharset.c	Mon Oct 20 19:49:42 2014
@@ -236,8 +236,9 @@ get_charset_aliases (void)
                           free (old_res_ptr);
                           break;
                         }
-                      strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
-                      strcpy (res_ptr + res_size - (l2 + 1), buf2);
+                      strlcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1,
+			l1 + 1 + l2 + 1 + 1);
+                      strlcpy (res_ptr + res_size - (l2 + 1), buf2, l2 + 1 + 1);
                     }
                   fclose (fp);
                   if (res_size == 0)
